import request from '@/utils/request'

// 查询新闻列表
export function listvideo(query) {
    return request({
        url: '/work/video/list',
        method: 'get',
        params: query
    })
}

// 查询新闻详细
export function getvideo(videoId) {
    return request({
        url: '/work/video/' + videoId,
        method: 'get'
    })
}

// 新增新闻
export function addvideo(data) {
    return request({
        url: '/work/video/saveOrUpdate',
        method: 'post',
        data: data
    })
}

// 修改新闻
export function updatevideo(data) {
    return request({
        url: '/work/video/saveOrUpdate',
        method: 'post',
        data: data
    })
}

// 删除新闻
export function delvideo(videoId) {
    return request({
        url: '/work/video/delete-by-id',
        method: 'get',
        params: { "id": videoId }
    })
}

export function delvideos(videoIds) {
    return request({
        url: '/work/video/delete-by-ids',
        method: 'get',
        params: { "ids": videoIds }
    })
}

